Public Class CustomProfessionalColorTable
    Inherits ProfessionalColorTable

    Private m_blnFlatToolStrip As Boolean

    Public Property FlatToolStrip() As Boolean
        Get
            Return m_blnFlatToolStrip
        End Get
        Set(ByVal value As Boolean)
            m_blnFlatToolStrip = value
        End Set
    End Property

    Public Overrides ReadOnly Property MenuStripGradientBegin() As Color
        Get
            Return MyBase.MenuStripGradientEnd
        End Get
    End Property

    Public Overrides ReadOnly Property ToolStripBorder() As System.Drawing.Color
        Get
            If Me.FlatToolStrip Then
                Return MyBase.MenuStripGradientEnd
            Else
                Return MyBase.ToolStripBorder
            End If
        End Get
    End Property

    Public Overrides ReadOnly Property ToolStripGradientBegin() As System.Drawing.Color
        Get
            If Me.FlatToolStrip Then
                Return MyBase.MenuStripGradientEnd
            Else
                Return MyBase.ToolStripGradientBegin
            End If
        End Get
    End Property

    Public Overrides ReadOnly Property ToolStripGradientEnd() As System.Drawing.Color
        Get
            If Me.FlatToolStrip Then
                Return MyBase.MenuStripGradientEnd
            Else
                Return MyBase.ToolStripGradientEnd
            End If
        End Get
    End Property

    Public Overrides ReadOnly Property ToolStripGradientMiddle() As System.Drawing.Color
        Get
            If Me.FlatToolStrip Then
                Return MyBase.MenuStripGradientEnd
            Else
                Return MyBase.ToolStripGradientMiddle
            End If
        End Get
    End Property

    Public Overrides ReadOnly Property ToolStripPanelGradientBegin() As System.Drawing.Color
        Get
            Return MyBase.ToolStripPanelGradientEnd
        End Get
    End Property

End Class
